Multicast route tracing refers to tracing the complete multicast forwarding route from a multicast data receiver to a multicast source. The existing Multicast Trace Route (Mtracert) is a troubleshooting tool of the multicast routing protocol. This tool implements tracing of the layer-3 multicast route.
Layer-3 multicast route tracing refers to tracing from the last-hop router of the direct connection multicast member to the first-hop router of the direct multicast source and obtaining a leaf-to-root route of the multicast tree. FIG. 1 shows a multicast structure in the prior art. The solid arrow in FIG. 1 indicates the data flow direction of implementing layer-3 multicast route tracing through an Mtracert.
Query apparatus A in FIG. 1 is a router or network management host on which an Mtracert tool is installed. The network administrator inputs a multicast trace command (mtrace) on the query apparatus A. The command is an instruction of tracing the multicast route from the multicast data receiver PC4 to the multicast source server 1, and the command includes an IP address S (namely, source address) of server 1, an IP address D1 (namely, destination address) of server PC4, and the address G1 of the multicast group that includes PC4. According to this command, the query apparatus A sends an Internet user Group Management Protocol (IGMP) Tracert Query packet to a last-hop router R5 directed to the destination address. FIG. 2 shows a structure of an IGMP Tracert Query packet in the prior art. The IGMP Tracert Query packet in FIG. 2 includes: a header of an IP packet composed of 20 bytes, an IP option, and a content part composed of 24 bytes. There may be zero or many IP options.
After receiving the IGMP Tracert Query packet, the router R5 initiates layer-3 multicast route tracing. The specific operation process is: The R5 sends an IGMP Tracert Request packet to a router R4 of the previous hop along an inverse multicast route directed to the source address. This packet is formed by modifying the IGMP Type field in the content part of the IGMP Tracert Query packet, and adding IGMP Tracert Response data of this node after the modified IGMP Tracert Query packet, in which the IGMP Tracert Response data carries information about the router R5. FIG. 3 shows a structure of IGMP Tracert Response data in the prior art.
After receiving the IGMP Tracert Request packet sent by R5, R4 adds IGMP Tracert Response data inclusive of R4 information after the packet to form a new IGMP Tracert Request packet, and sends the packet to R2. On the basis of analogy, after receiving the IGMP Tracert Request packet, the first-hop router R1 connected to the multicast source (server 1) sends an IGMP Tracert Response packet to query apparatus A. The IGMP Tracert Response packet is formed by modifying the IGMP Type field in the content part of the IGMP Tracert Request packet, and adding the IGMP Tracert Response data of this node into the modified IGMP Tracert Request packet. The IGMP Tracert Response packet includes the IGMP Tracert Response data added by each router in the transmission process of the IGMP Tracert Request packet. According to the IGMP Tracert Response packet, query apparatus A knows the multicast traffic from the last-hop R5 to the first-hop R1.
In the process of developing the present invention, the inventor finds that: In the multicast route tracing process above, after receiving the IGMP Tracert Query packet, the last-hop router sends an IGMP Tracert Request packet to the node of the previous hop to initiate layer-3 multicast route tracing; after receiving the IGMP Tracert Request packet, the first-hop router returns a layer-3 multicast route tracing response by sending an IGMP Tracert Response packet to the response address (such as query apparatus A) specified in the IGMP Tracert Request. This process implements only layer-3 multicast route tracing, and cannot implement layer-2 multicast route tracing.